import Mock from 'mockjs'

export default {
  getTestData: () => {
    return Mock.mock({
      code: 200,
      'data|10': [
        {
          'id|+1': 1,
          name: '@cname',
          'age|1-100': 1,
          address: '@county(true)'
        }
      ]
    })
  },
  getTableData: () => {
    return {
      code: 200,
      data: [
        {
          name: 'oppo',
          todayBuy: 500,
          monthBuy: 3500,
          totalBuy: 22000
        },
        {
          name: 'vivo',
          todayBuy: 1000,
          monthBuy: 2000,
          totalBuy: 10000
        },
        {
          name: '小米',
          todayBuy: 2000,
          monthBuy: 8000,
          totalBuy: 20000
        },
        {
          name: '华为',
          todayBuy: 1500,
          monthBuy: 10000,
          totalBuy: 15000
        },
        {
          name: '三星',
          todayBuy: 1000,
          monthBuy: 5000,
          totalBuy: 10000
        },
        {
          name: '魅族',
          todayBuy: 1000,
          monthBuy: 5000,
          totalBuy: 10000
        }
      ]
    }
  },
  getCountData: () => {
    return {
      code: 200,
      data: [
        {
          name: '今日支付订单',
          value: 1234,
          icon: 'SuccessFilled',
          color: '#2ec7c9'
        },
        {
          name: '今日新增用户',
          value: 234,
          icon: 'UserFilled',
          color: '#b6a2de'
        },
        {
          name: '今日访问量',
          value: 1234,
          icon: 'Monitor',
          color: '#5ab1ef'
        },
        {
          name: '今日交易额',
          value: 1234,
          icon: 'Money',
          color: '#ffb980'
        },
        {
          name: '待办事项',
          value: 1234,
          icon: 'Files',
          color: '#d87a80'
        },
        {
          name: '待处理事项',
          value: 1234,
          icon: 'Files',
          color: '#8d98b0'
        }
      ]
    }
  },
  getChartData: () => {
    return {
      code: 200,
      data: {
        orderData: {
          date: ['2024-09-01', '2024-09-02', '2024-09-03', '2024-09-04', '2024-09-05', '2024-09-06', '2024-09-07'],
          data: [
            {
              苹果: 3839,
              小米: 2345,
              华为: 1234,
              vivo: 2945,
              魅族: 1834,
              三星: 2645,
              联想: 3234
            },
            {
              苹果: 2345,
              小米: 1234,
              华为: 3345,
              vivo: 4234,
              魅族: 2345,
              三星: 1534,
              联想: 2845
            },
            {
              苹果: 1734,
              小米: 2945,
              华为: 1834,
              vivo: 2045,
              魅族: 1234,
              三星: 2345,
              联想: 1934
            },
            {
              苹果: 2345,
              小米: 2945,
              华为: 1234,
              vivo: 2645,
              魅族: 1834,
              三星: 2045,
              联想: 1534
            },
            {
              苹果: 2345,
              小米: 1534,
              华为: 2645,
              vivo: 1234,
              魅族: 2945,
              三星: 1834,
              联想: 2045
            },
            {
              苹果: 1234,
              小米: 2345,
              华为: 2645,
              vivo: 1534,
              魅族: 2945,
              三星: 1834,
              联想: 2045
            },
            {
              苹果: 2345,
              小米: 1234,
              华为: 2645,
              vivo: 4234,
              魅族: 3645,
              三星: 2034,
              联想: 3345
            }
          ]
        },
        videoData: [
          { name: '小米', value: 2345 },
          { name: '华为', value: 1234 },
          { name: 'vivo', value: 2345 },
          { name: '魅族', value: 1234 },
          { name: '三星', value: 2345 },
          { name: '联想', value: 1234 },
          { name: 'oppo', value: 2345 }
        ],
        userData: [
          { date: '周一', new: 115, active: 200 },
          { date: '周二', new: 110, active: 300 },
          { date: '周三', new: 115, active: 400 },
          { date: '周四', new: 120, active: 500 },
          { date: '周五', new: 125, active: 600 },
          { date: '周六', new: 130, active: 700 },
          { date: '周日', new: 135, active: 800 }
        ]
      }
    }
  }
}
